Chaingateway public API (2.0.0-beta)

Download OpenAPI specification:Download

Blockchain API to build the bridge between Blockchain and the real world

Introduction

This API allows you to interact with Ethereum, Binance smartchain and Tron blockchain. If you ever looked for a possibility to automate token or payments this is the right place. You still have no idea for real use cases? Let me give you some examples: Accept your own token as payment method for your shop, distribute airdrop tokens of your ICO, convert your site currency to a token that can be traded on exchanges and many more. There are a lot of use cases which are not only limited to sending tokens but also receiving them. You could even create a secure wallet for your token which only the wallet owner has access to.

Endpoints

At the moment we only have an production endpoint. Its reachable at

api.chaingateway.io

Postman

Postman is a great software to test APIs, it helped us a lot when developing this API. If you haven't installed it yet, you can download it here. We have created a Postman collection that allows to import all functions and their settings, including descriptions in Postman. This way you can test all functions with the click of a button (just change the parameters before). You can import the collection by clicking the button below:

Run in Postman

Authorization

You can get your personal API Key from your account dashboard. It is used by us to determine who is accessing the API and to count the requests by that account. Add it in the HTTP header

Authorization: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m

Please do not share your api key! If you did so by mistake, immediately delete it in your account panel and create a new one!

Ethereum

Ethereum > Info Requests

getLastBlockNumber

Get the latest block number

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Authorization
string
Example: {{api_key}}

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/blocks/number',
  headers: {Accept: 'SOME_STRING_VALUE', Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed",
  • "data": {
    }
}

getERC20

Get information about an ERC20 token

Authorizations:
apikeyAuth
path Parameters
erc20_token
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce

An ERC20 token address

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/erc20/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! ERC20 Token has been successfully parsed.",
  • "data": {
    }
}

getGasPrice

Get gas price

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Authorization
string
Example: APIKEY

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/gasprice',
  headers: {Accept: 'SOME_STRING_VALUE', Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed",
  • "data": {
    }
}

getEthereumBalance

Get the balance of an address

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce

Ethereum address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/balances/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Ethereum address balance successfully parsed.",
  • "data": {
    }
}

getAllERC20Balance

Get the balance of an ERC20 address

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce
erc20_token
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/balances/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce/erc20/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Token Balance has been successfully parsed.",
  • "data": {
    }
}

getBlock

Get information of a specific block

Authorizations:
apikeyAuth
path Parameters
block
required
string
Example: 0xd9186b67ae0d3ee0777a607eeb195c5a9fb0affcd78ddcd7481efae4b258c9f5

Block number or hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/blocks/0xd9186b67ae0d3ee0777a607eeb195c5a9fb0affcd78ddcd7481efae4b258c9f5',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed the block.",
  • "data": [
    ]
}

getNFTUri

Get the URI of an NFT

Authorizations:
apikeyAuth
path Parameters
contract
required
string
Example: 0x9db475371b5cc2913d3219f72e16a3f101339a05

NFT contract address

token_id
required
integer
Example: 374

Id of the NFT

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/nfts/0x9db475371b5cc2913d3219f72e16a3f101339a05/uri/374',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{}

getNFTOwner

Get the Owner of an NFT

Authorizations:
apikeyAuth
path Parameters
contract
required
string
Example: 0x9db475371b5cc2913d3219f72e16a3f101339a05

NFT contract address

token_id
required
integer
Example: 374

Id of the NFT

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/nfts/0x9db475371b5cc2913d3219f72e16a3f101339a05/owner/374',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "NFT Owner has been successfully parsed.",
  • "data": {
    }
}

getTransaction

Get info about a transaction

You can choose if you want to get the Transaction encoded or decoded by add /decoded to your request. See examlpes for details

Authorizations:
apikeyAuth
path Parameters
transaction
required
string
Example: 0x0b361c13214a0d498b69d6ea86039fdf8e578f4b6e3b28db52a422f8ed3ea037

Transaction hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/transactions/0x0b361c13214a0d498b69d6ea86039fdf8e578f4b6e3b28db52a422f8ed3ea037/decoded',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transactionReceipt",
  • "data": [
    ]
}

getTransactionReceipt

Get info about a transaction receipt

You can choose if you want to get the Transaction encoded or decoded by add /decoded to your request. See examlpes for details

Authorizations:
apikeyAuth
path Parameters
transaction
required
string
Example: 0x0b361c13214a0d498b69d6ea86039fdf8e578f4b6e3b28db52a422f8ed3ea037

Transaction hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/transactions/0x0b361c13214a0d498b69d6ea86039fdf8e578f4b6e3b28db52a422f8ed3ea037/receipt/decoded',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transactionReceipt",
  • "data": [
    ]
}

Ethereum > Address Requests

newAddress

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "password": "test123"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Address was successfully created.",
  • "data": {
    }
}

listAddresses

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/addresses',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Addresses has been successfully parsed.",
  • "data": {
    }
}

deleteAddress

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xfa343ee01667869cfb409b24ae33f7ce8b110eb0

Ethereum address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/ethereum/addresses/0xfa343ee01667869cfb409b24ae33f7ce8b110eb0',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Address has been successfully deleted.",
  • "data": {
    }
}

importAddress

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "filename": "UTC--2020-09-19T10-42-26.196Z--71892889ed4d79d88ab6ea3783b571b8ece9bef4",
  • "content": {
    },
  • "password": "padN39QkRA2hJ"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum address has been successfully imported.",
  • "data": {
    }
}

exportAddress

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xacc767f4042360c5f08c7b98bac8e66a5c679cef

0xe7114f0dbd5a5fa62ed2df905f7391c957ff9e36

header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "password": "test123"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum address has been successfully exported.",
  • "data": {
    }
}

ListTransactionsByAddress

Our API provides an endpoint for retrieving all transactions associated with a particular blockchain address. To use this endpoint, you will need to provide the wallet address as a parameter in the request.

Each page of results returned by this endpoint contains up to 100 entries, and you can use a paginator to navigate through the pages of results.

To use the paginator, you can include parameter in your request: "page" . The "page" parameter specifies which page of results to retrieve,

For example, to retrieve the first 100 transactions associated with a particular blockchain address, you would make a request to the following URL:

/addresses//transactions/1

If there are more than 100 transactions associated with the blockchain address, you can retrieve additional pages of results by incrementing the "page" parameter in your request. For example, to retrieve the next 100 transactions, you would make a request to the following URL:

/addresses//transactions/2

By using the paginator, you can retrieve all transactions associated with a particular blockchain address, regardless of the total number of transactions in the blockchain.

each request tells you the max pages within the Request in the max_pages field

"max_pages": 515

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5

account address

page
required
integer
Example: 1

Current page, see description for more informatiosn how pagination works

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/addresses/0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5/transactions/1'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Addresses has been successfully parsed.",
  • "data": {
    }
}

Ethereum > Webhooks/IPN Requests

With webhooks, you can get notified about various events in the blockchain. E.g:

Receipt of payment to a specific address
Outgoing payment from a specific address
Exchange of sats between two specific addresses
Execution of a contract
Change of ownership of a token

For this you have to create a webhook with certain filter criteria. The following values are available as filter criteria:

from: Outgoing address
to: Incoming address
contract: Contract that should be monitored
tokenid: ID of a token that should be monitored.
type: Token type ([ETH', 'ERC20', 'ERC721', null)

Parameter "url" defines the url we are calling with a POST Request.. The request body will have your filter criterias and some additional informatiion about your transaction:

{
  "id": "63a1ae0887ca3625b82b4924",
  "webhook_id": "63a1ad0e87ca3625b82b4923",
  "from": "0x0000000000000000000000000000000000000000",
  "to": "0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
  "blocknumber": "123",
  "datetime": "22-12-20 13:43:52",
  "tokenid": "0x0000000000000000000000000000000000000000",
  "type": null,
  "txid": "000000000000000000000000000000000000000000000000000",
  "amount": "000000000000000000000000000000000000000000000000000"
}

subscribeAddress

Creates a new subscription/IPN for the given address (and contractaddress). You will receive a notification to the given url every time a deposit is received. Unsubscribe the address before sending tokens/ETH from it or you won't get reliable notifications anymore.

You can choose one or more from following filter criterias

Parameter Description
from ethereum address
to ethereum address
contractaddress contract address
tokenid token id

You also need to dpecify the parameter "type". you can choose between ['ETH', 'ERC20', 'ERC721', null]

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully subscribed to IPN!.",
  • "data": {
    }
}

listSubscribedAddresses

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/webhooks',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! IPNs could be successfully parsed.",
  • "data": {
    }
}

unsubscribeAddress

Deletes an existing subscription/IPN for the given address (and contractaddress).

Authorizations:
apikeyAuth
path Parameters
webhook
required
string
Example: 626407c62e5e8235ca561dce

Webhook id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/ethereum/webhooks/626407c62e5e8235ca561dce',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully unsubscribed to IPN!.",
  • "data": {
    }
}

listFailedIPNs

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
path Parameters
webhook
required
string
Example: 626407c62e5e8235ca561dce

webhook id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/webkhooks/626407c62e5e8235ca561dce/notifications/failed',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "failed_ipns": [
    ]
}

listIPNsByWebhookId

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/ethereum/webkhooks/notifications/failed',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "failed_ipns": [
    ]
}

resendFailedIPN

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
path Parameters
notification
required
string
Example: 62640817eb594da78c7bee00

Notification api

header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! IPN successfully got resent.",
  • "data": {
    }
}

Ethereum > Transaction Requests

sendERC20

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
  • "contractaddress": "0x55d398326f99059fF775485246999027B3197955",
  • "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48",
  • "amount": 0.1,
  • "password": "test123",
  • "gas": 0
}

sendERC721

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: */*
string

Responses

Request samples

const request = require('request');

const options = {
  method: 'POST',
  url: 'https://api.chaingateway.io/v2/ethereum/transactions/erc721',
  headers: {'content-type': '*/*', Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

sendTransaction

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
  • "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48",
  • "amount": "0.1",
  • "password": "test123",
  • "gas": 0
}

broadcastTransaction

Broadcast raw transactions

Authorizations:
apikeyAuth
header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": "0xf86b0685012a05f20082520894dfa04096652804362e4b7ae31835416974271e298609184e72a000808194a086277b0f2d7df91c9ce580171cd7f7be6e2c298727944a13fb40e5e9406ccb61a076105cefee8def061024dfb333a1bd47f629b52aae6621d2f2f39a0dccc3ac85"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Transaction has been successfully broadcasted.",
  • "data": {
    }
}

Polygon

Polygon > Info Requests

getLastBlockNumber

Get the latest block number

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/blocks/number',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed",
  • "data": {
    }
}

getERC20

Get information about an ERC20 token

Authorizations:
apikeyAuth
path Parameters
erc20_token
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce

ERC20 token address

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/erc20/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! ERC20 Token has been successfully parsed.",
  • "data": {
    }
}

getGasPrice

Get gas price

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/gasprice',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed",
  • "data": {
    }
}

getPolygonBalance

Get the balance of an address

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce

Polygon address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/balances/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Ethereum address balance successfully parsed.",
  • "data": {
    }
}

getERC20Balance

Get the balance of an ERC20 address

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce

Polygon address

erc20_token
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/balances/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce/erc20/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Token Balance has been successfully parsed.",
  • "data": {
    }
}

getBlock

Get information of a specific block

Authorizations:
apikeyAuth
path Parameters
block
required
string
Example: 0xd9186b67ae0d3ee0777a607eeb195c5a9fb0affcd78ddcd7481efae4b258c9f5

Polygon block number or hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/blocks/0xd9186b67ae0d3ee0777a607eeb195c5a9fb0affcd78ddcd7481efae4b258c9f5',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed the block.",
  • "data": [
    ]
}

getNFTUri

Get the URI of an NFT

Authorizations:
apikeyAuth
path Parameters
ft_contract
required
string
token_id
required
string
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/nfts/%7Bft_contract%7D/uri/%7Btoken_id%7D',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{}

getNFTOwner

Get the Owner of an NFT

Authorizations:
apikeyAuth
path Parameters
contract
required
string
Example: 0xd9186b67ae0d3ee0777a607eeb195c5a9fb0affcd78ddcd7481efae4b258c9f5

Polygon contract address

token_id
required
integer
Example: 374

Polygon token id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/nfts/0xd9186b67ae0d3ee0777a607eeb195c5a9fb0affcd78ddcd7481efae4b258c9f5/owner/374',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "NFT Owner has been successfully parsed.",
  • "data": {
    }
}

getTransaction

Get info about a transaction

You can choose if you want to get the Transaction encoded or decoded by add /decoded to your request. See examlpes for details

Authorizations:
apikeyAuth
path Parameters
transaction
required
string
Example: 0x0b361c13214a0d498b69d6ea86039fdf8e578f4b6e3b28db52a422f8ed3ea037

Transaction hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/transactions/0x0b361c13214a0d498b69d6ea86039fdf8e578f4b6e3b28db52a422f8ed3ea037/decoded',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transactionReceipt",
  • "data": [
    ]
}

getTransactionReceipt

Get info about a transaction receipt

You can choose if you want to get the Transaction encoded or decoded by add /decoded to your request. See examlpes for details

Authorizations:
apikeyAuth
path Parameters
transaction
required
string
Example: 0x0b361c13214a0d498b69d6ea86039fdf8e578f4b6e3b28db52a422f8ed3ea037

Transaction hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/transactions/0x0b361c13214a0d498b69d6ea86039fdf8e578f4b6e3b28db52a422f8ed3ea037/receipt/decoded',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transactionReceipt",
  • "data": [
    ]
}

Polygon > Address Requests

newAddress

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "password": "test123"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Address was successfully created.",
  • "data": {
    }
}

listAddresses

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/addresses',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Addresses has been successfully parsed.",
  • "data": {
    }
}

deleteAddress

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xfa343ee01667869cfb409b24ae33f7ce8b110eb0

Polygon address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/polygon/addresses/0xfa343ee01667869cfb409b24ae33f7ce8b110eb0',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Address has been successfully deleted.",
  • "data": {
    }
}

importAddress

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "filename": "UTC--2020-09-19T10-42-26.196Z--71892889ed4d79d88ab6ea3783b571b8ece9bef4",
  • "content": {
    },
  • "password": "padN39QkRA2hJ"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum address has been successfully imported.",
  • "data": {
    }
}

exportAddress

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xfa343ee01667869cfb409b24ae33f7ce8b110eb0

Polygon address

header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
""

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum address has been successfully exported.",
  • "data": {
    }
}

ListTransactionsByAddress

Our API provides an endpoint for retrieving all transactions associated with a particular blockchain address. To use this endpoint, you will need to provide the wallet address as a parameter in the request.

Each page of results returned by this endpoint contains up to 100 entries, and you can use a paginator to navigate through the pages of results.

To use the paginator, you can include parameter in your request: "page" . The "page" parameter specifies which page of results to retrieve,

For example, to retrieve the first 100 transactions associated with a particular blockchain address, you would make a request to the following URL:

/addresses//transactions/1

If there are more than 100 transactions associated with the blockchain address, you can retrieve additional pages of results by incrementing the "page" parameter in your request. For example, to retrieve the next 100 transactions, you would make a request to the following URL:

/addresses//transactions/2

By using the paginator, you can retrieve all transactions associated with a particular blockchain address, regardless of the total number of transactions in the blockchain.

each request tells you the max pages within the Request in the max_pages field

"max_pages": 515

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5

account address

page
required
integer
Example: 1

Current page, see description for more informatiosn how pagination works

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/addresses/0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5/transactions/1'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Addresses has been successfully parsed.",
  • "data": {
    }
}

Polygon > Webhooks/IPN Requests

With webhooks, you can get notified about various events in the blockchain. E.g:

Receipt of payment to a specific address
Outgoing payment from a specific address
Exchange of sats between two specific addresses
Execution of a contract
Change of ownership of a token

For this you have to create a webhook with certain filter criteria. The following values are available as filter criteria:

from: Outgoing address
to: Incoming address
contract: Contract that should be monitored
tokenid: ID of a token that should be monitored.
type: Token type ([ETH', 'ERC20', 'ERC721', null)

Parameter "url" defines the url we are calling with a POST Request.. The request body will have your filter criterias and some additional informatiion about your transaction:

{
  "id": "63a1ae0887ca3625b82b4924",
  "webhook_id": "63a1ad0e87ca3625b82b4923",
  "from": "0x0000000000000000000000000000000000000000",
  "to": "0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
  "blocknumber": "123",
  "datetime": "22-12-20 13:43:52",
  "tokenid": "0x0000000000000000000000000000000000000000",
  "type": null,
  "txid": "000000000000000000000000000000000000000000000000000",
  "amount": "000000000000000000000000000000000000000000000000000"
}

subscribeAddress

Creates a new subscription/IPN for the given address (and contractaddress). You will receive a notification to the given url every time a deposit is received. Unsubscribe the address before sending tokens/ETH from it or you won't get reliable notifications anymore.

You can choose one or more from following filter criterias

Parameter Description
from ethereum address
to ethereum address
contractaddress contract address
tokenid token id

You also need to dpecify the parameter "type". you can choose between ['ETH', 'ERC20', 'ERC721', null]

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully subscribed to IPN!.",
  • "data": {
    }
}

listSubscribedAddresses

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/webhooks',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! IPNs could be successfully parsed.",
  • "data": {
    }
}

unsubscribeAddress

Deletes an existing subscription/IPN for the given address (and contractaddress).

Authorizations:
apikeyAuth
path Parameters
webhook
required
string
Example: 626407c62e5e8235ca561dce

Webhook Id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/polygon/webhooks/626407c62e5e8235ca561dce',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully unsubscribed to IPN!.",
  • "data": {
    }
}

listFailedIPNs

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
path Parameters
webhook
required
string
Example: 626407c62e5e8235ca561dce

Webhook Id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/webkhooks/626407c62e5e8235ca561dce/notifications/failed',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "failed_ipns": [
    ]
}

listIPNsByWebhookId

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/polygon/webkhooks/notifications/failed',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "failed_ipns": [
    ]
}

resendFailedIPN

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
path Parameters
notification_id
required
string
Example: 626407c62e5e8235ca561dce

Notification Id

header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! IPN successfully got resent.",
  • "data": {
    }
}

Polygon > Transaction Requests

sendERC20

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
  • "contractaddress": "0x55d398326f99059fF775485246999027B3197955",
  • "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48",
  • "amount": 0.1,
  • "password": "test123",
  • "gas": 0
}

sendERC721

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: */*
string

Responses

Request samples

const request = require('request');

const options = {
  method: 'POST',
  url: 'https://api.chaingateway.io/v2/polygon/transactions/erc721',
  headers: {'content-type': '*/*', Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

sendTransaction

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
  • "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48",
  • "amount": "0.1",
  • "password": "test123",
  • "gas": 0
}

broadcastTransaction

Broadcast raw transactions

Authorizations:
apikeyAuth
header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": "0xf86b0685012a05f20082520894dfa04096652804362e4b7ae31835416974271e298609184e72a000808194a086277b0f2d7df91c9ce580171cd7f7be6e2c298727944a13fb40e5e9406ccb61a076105cefee8def061024dfb333a1bd47f629b52aae6621d2f2f39a0dccc3ac85"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Transaction has been successfully broadcasted.",
  • "data": {
    }
}

BinanceSmartChain

BinanceSmartChain > Info Requests

getLastBlocknumber

Get the latest block number

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/blocks/number',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed",
  • "data": {
    }
}

getGasPrice

Get gas price

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/gasprice',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed",
  • "data": {
    }
}

getBlock

Get information of a specific block

Authorizations:
apikeyAuth
path Parameters
block
required
integer
Example: 2000

Block number or hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/blocks/2000',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed the block.",
  • "data": [
    ]
}

getBinanceCoinBalance

Get the balance of an address

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce

BSC address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/balances/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Binancecoin address balance successfully parsed.",
  • "data": {
    }
}

getNFTUri

Get the URI of an NFT

Authorizations:
apikeyAuth
path Parameters
contract
required
string
Example: 0xE6965B4F189DBDB2BD65e60aBAeb531B6fE9580B

BSC contract address

token_id
required
integer
Example: 403706

Token Id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/nfts/0xE6965B4F189DBDB2BD65e60aBAeb531B6fE9580B/uri/403706',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{}

getNFTOwner

Get the Owner of an NFT

Authorizations:
apikeyAuth
path Parameters
contract
required
string
Example: 0xE6965B4F189DBDB2BD65e60aBAeb531B6fE9580B

BSC contract address

token_id
required
integer
Example: 403706

Token id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/nfts/0xE6965B4F189DBDB2BD65e60aBAeb531B6fE9580B/owner/403706',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "NFT Owner has been successfully parsed.",
  • "data": {
    }
}

getBEP20

Receive information of a BEP20 address

Authorizations:
apikeyAuth
path Parameters
contract
required
string
Example: 0xE6965B4F189DBDB2BD65e60aBAeb531B6fE9580B

BSC contract address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/bep20/0xE6965B4F189DBDB2BD65e60aBAeb531B6fE9580B',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! BEP20 Token has been successfully parsed.",
  • "data": {
    }
}

getBEP20Balance

Get the balance of a BEP20 address

Authorizations:
apikeyAuth
path Parameters
contract
required
string
Example: 0x1dDB2C0897daF18632662E71fdD2dbDC0eB3a9Ec

BEP20 contract address

token_id
required
string
Example: 0x9dB475371B5cC2913D3219f72e16a3F101339a05

Token id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/balances/0x1dDB2C0897daF18632662E71fdD2dbDC0eB3a9Ec/bep20/0x9dB475371B5cC2913D3219f72e16a3F101339a05',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Token Balance has been successfully parsed.",
  • "data": {
    }
}

getTransaction

Get info about a transaction

You can get your transaction decoded by add /decoded to your api call. If you want to get the transaction encoded, youst remove the /decoded part

Authorizations:
apikeyAuth
path Parameters
transaction
required
string
Example: 0x59ca89ea05be9a9e83958404924a2ae450fe8e691b1aeedecf3a3645c6f64534

Transaction hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/transactions/0x59ca89ea05be9a9e83958404924a2ae450fe8e691b1aeedecf3a3645c6f64534/decoded',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transaction.",
  • "data": [
    ]
}

getTransactionReceipt

Get info about a transaction receipt

You can get your transaction decoded by add /decoded to your api call. If you want to get the transaction encoded, youst remove the /decoded part

Authorizations:
apikeyAuth
path Parameters
transaction
required
string
Example: 0x59ca89ea05be9a9e83958404924a2ae450fe8e691b1aeedecf3a3645c6f64534

Transaction hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/transactions/0x59ca89ea05be9a9e83958404924a2ae450fe8e691b1aeedecf3a3645c6f64534/receipt/decoded',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transactionReceipt",
  • "data": [
    ]
}

BinanceSmartChain > Address Requests

newAddress

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "password": "test123"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! BSC Address was successfully created.",
  • "data": {
    }
}

listAddress

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/addresses',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! BSC Addresses has been successfully parsed.",
  • "data": {
    }
}

deleteAddress

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce

BSC address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/bsc/addresses/0xa1f36016221d48ce7f15cde7b826a4fbe09bacce',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Address has been successfully deleted.",
  • "data": {
    }
}

importAddress

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "filename": "UTC--2020-05-01T12-30-12.020Z--4fb45889cd2d3348348e39c613c41bf1dc43760a",
  • "content": {
    },
  • "password": "padN39QkRA2hJ"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! BSC address has been successfully imported.",
  • "data": {
    }
}

exportAddress

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xa1f36016221d48ce7f15cde7b826a4fbe09bacce

BSC address

header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "password": "test123"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! BSC address has been successfully exported.",
  • "data": {
    }
}

ListTransactionsByAddress

Our API provides an endpoint for retrieving all transactions associated with a particular blockchain address. To use this endpoint, you will need to provide the wallet address as a parameter in the request.

Each page of results returned by this endpoint contains up to 100 entries, and you can use a paginator to navigate through the pages of results.

To use the paginator, you can include parameter in your request: "page" . The "page" parameter specifies which page of results to retrieve,

For example, to retrieve the first 100 transactions associated with a particular blockchain address, you would make a request to the following URL:

/addresses//transactions/1

If there are more than 100 transactions associated with the blockchain address, you can retrieve additional pages of results by incrementing the "page" parameter in your request. For example, to retrieve the next 100 transactions, you would make a request to the following URL:

/addresses//transactions/2

By using the paginator, you can retrieve all transactions associated with a particular blockchain address, regardless of the total number of transactions in the blockchain.

each request tells you the max pages within the Request in the max_pages field

"max_pages": 515

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5

account address

page
required
integer
Example: 1

Current page, see description for more informatiosn how pagination works

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/addresses/0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5/transactions/1'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Addresses has been successfully parsed.",
  • "data": {
    }
}

BinanceSmartChain > Webhooks/IPN Requests

With webhooks, you can get notified about various events in the blockchain. E.g:

Receipt of payment to a specific address
Outgoing payment from a specific address
Exchange of sats between two specific addresses
Execution of a contract
Change of ownership of a token

For this you have to create a webhook with certain filter criteria. The following values are available as filter criteria:

from: Outgoing address
to: Incoming address
contract: Contract that should be monitored
tokenid: ID of a token that should be monitored.
type: Token type ([ETH', 'ERC20', 'ERC721', null)

Parameter "url" defines the url we are calling with a POST Request.. The request body will have your filter criterias and some additional informatiion about your transaction:

{
 "id": "63a1ae0887ca3625b82b4924",
  "webhook_id": "63a1ad0e87ca3625b82b4923",
  "from": "0x0000000000000000000000000000000000000000",
  "to": "0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
  "blocknumber": "123",
  "datetime": "22-12-20 13:43:52",
  "tokenid": "0x0000000000000000000000000000000000000000",
  "type": null,
  "txid": "000000000000000000000000000000000000000000000000000",
  "amount": "000000000000000000000000000000000000000000000000000"
}

subscribeAddress

Creates a new subscription/IPN for the given address (and contractaddress). You will receive a notification to the given url every time a deposit is received. Unsubscribe the address before sending tokens/ETH from it or you won't get reliable notifications anymore.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully subscribed to IPN!.",
  • "data": {
    }
}

listSubscribedAddresses

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/webhooks',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! IPNs could be successfully parsed. But sadly you have no IPNs subscribed.",
  • "data": {
    }
}

unsubscribeAddress

Deletes an existing subscription/IPN for the given address (and contractaddress).

Authorizations:
apikeyAuth
path Parameters
webhook
required
string
Example: 624d7db34b026365cc22356b

Webhook id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/bsc/webhooks/624d7db34b026365cc22356b',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully unsubscribed to IPN!.",
  • "data": {
    }
}

listFailedIPNs

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bsc/webhooks/notifications/failed',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! IPNs could be successfully parsed.",
  • "data": {
    }
}

resendFailedIPN

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
path Parameters
notification_id
required
string
Example: 62640817eb594da78c7bee00

Notification id

header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "id": 17766
}

BinanceSmartChain > Transaction Requests

sendBEP20

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
  • "contractaddress": "0x55d398326f99059fF775485246999027B3197955",
  • "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48",
  • "amount": "0.1",
  • "password": "test123",
  • "gas": 0
}

sendBEP721

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
  • "contractaddress": "0x55d398326f99059fF775485246999027B3197955",
  • "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48",
  • "tokenid": 123,
  • "password": "test123"
}

sendTransaction

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
  • "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48",
  • "amount": "0.1",
  • "password": "test123"
}

broadcastTransaction

Broadcast raw transactions

Authorizations:
apikeyAuth
header Parameters
Content-Type
string
Example: application/json
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": "0xf86b0685012a05f20082520894dfa04096652804362e4b7ae31835416974271e298609184e72a000808194a086277b0f2d7df91c9ce580171cd7f7be6e2c298727944a13fb40e5e9406ccb61a076105cefee8def061024dfb333a1bd47f629b52aae6621d2f2f39a0dccc3ac85"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Transaction has been successfully broadcasted.",
  • "data": {
    }
}

Tron

Tron > Info Requests

getLastBlockNumber

Get the latest block number

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/blocks/number',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed",
  • "data": {
    }
}

getBlock

Authorizations:
apikeyAuth
path Parameters
block
required
integer
Example: 300

Block number

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/blocks/300',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed the block.",
  • "data": [
    ]
}

getTransaction

You can get your transaction decoded by add /decoded to your api call. If you want to get the transaction encoded, youst remove the /decoded part

Authorizations:
apikeyAuth
path Parameters
transaction
required
string
Example: dab6bb52e098232a2f115d56419124df1463ae60ac4f2effdb59984c550d8fa9

Transaction hash

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/transactions/dab6bb52e098232a2f115d56419124df1463ae60ac4f2effdb59984c550d8fa9/decoded',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transaction data.",
  • "data": {
    }
}

getTransactionReceipt

You can get your transaction decoded by add /decoded to your api call. If you want to get the transaction encoded, youst remove the /decoded part

Authorizations:
apikeyAuth
path Parameters
transaction
required
string
Example: dab6bb52e098232a2f115d56419124df1463ae60ac4f2effdb59984c550d8fa9

Transaction hash

header Parameters
Accept
string
Example: application/json
Authorization
string
Example: APIKEY

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/transactions/dab6bb52e098232a2f115d56419124df1463ae60ac4f2effdb59984c550d8fa9/receipt/decoded',
  headers: {Accept: 'SOME_STRING_VALUE', Authorization: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
Example
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transaction data.",
  • "data": {
    }
}

getAccountResources

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: TVqA9huwk2NBUxbanUNx4NVPKXjzWZqkJt

Account address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/account/TVqA9huwk2NBUxbanUNx4NVPKXjzWZqkJt/resources',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed account informations.",
  • "data": [
    ]
}

getChainParameters

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/chainparameters',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed chain parameters.",
  • "data": [
    ]
}

getTronBalance

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: TSU2h3XdoW53hNkts2dQoXbJSNP1uL4r7A

Account address

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/balances/TSU2h3XdoW53hNkts2dQoXbJSNP1uL4r7A',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Tron balance successfully parsed.",
  • "data": {
    }
}

getTRC10Balance

Authorizations:
apikeyAuth
path Parameters
account
required
string
Example: TVqA9huwk2NBUxbanUNx4NVPKXjzWZqkJt

Account address

tokenId
required
integer
Example: 10020000

Token Id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/balances/TVqA9huwk2NBUxbanUNx4NVPKXjzWZqkJt/trc10/10020000',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! TRC10 balance successfully parsed.",
  • "data": {
    }
}

getTRC20Balance

Authorizations:
apikeyAuth
path Parameters
account
required
string
Example: TVqA9huwk2NBUxbanUNx4NVPKXjzWZqkJt

Account address

token
required
string
Example: TGTE9Eo4hrkotStM1iGHSKA7gobxZxPuwQ

Tron TRC20 token

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/balances/TVqA9huwk2NBUxbanUNx4NVPKXjzWZqkJt/trc20/TGTE9Eo4hrkotStM1iGHSKA7gobxZxPuwQ',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! TRC20 balance successfully parsed.",
  • "data": {
    }
}

Tron > Address Requests

newAddress

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "password": "test123"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Address was successfully created.",
  • "data": {
    }
}

ListTransactionsByAddress

Our API provides an endpoint for retrieving all transactions associated with a particular blockchain address. To use this endpoint, you will need to provide the wallet address as a parameter in the request.

Each page of results returned by this endpoint contains up to 100 entries, and you can use a paginator to navigate through the pages of results.

To use the paginator, you can include parameter in your request: "page" . The "page" parameter specifies which page of results to retrieve,

For example, to retrieve the first 100 transactions associated with a particular blockchain address, you would make a request to the following URL:

/addresses//transactions/1

If there are more than 100 transactions associated with the blockchain address, you can retrieve additional pages of results by incrementing the "page" parameter in your request. For example, to retrieve the next 100 transactions, you would make a request to the following URL:

/addresses//transactions/2

By using the paginator, you can retrieve all transactions associated with a particular blockchain address, regardless of the total number of transactions in the blockchain.

each request tells you the max pages within the Request in the max_pages field

"max_pages": 515

Authorizations:
apikeyAuth
path Parameters
address
required
string
Example: 0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5

account address

page
required
integer
Example: 1

Current page, see description for more informatiosn how pagination works

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/addresses/0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5/transactions/1'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Ethereum Addresses has been successfully parsed.",
  • "data": {
    }
}

Tron > Webhooks/IPN Requests

With webhooks, you can get notified about various events in the blockchain. E.g:

Receipt of payment to a specific address
Outgoing payment from a specific address
Exchange of sats between two specific addresses
Execution of a contract
Change of ownership of a token

For this you have to create a webhook with certain filter criteria. The following values are available as filter criteria:

from: Outgoing address
to: Incoming address
contract: Contract that should be monitored
tokenid: ID of a token that should be monitored.
type: Token type ([ETH', 'ERC20', 'ERC721', null)

Parameter "url" defines the url we are calling with a POST Request.. The request body will have your filter criterias and some additional informatiion about your transaction:

{
  "id": "63a1ae0887ca3625b82b4924",
  "webhook_id": "63a1ad0e87ca3625b82b4923",
  "from": "0x0000000000000000000000000000000000000000",
  "to": "0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
  "blocknumber": "123",
  "datetime": "22-12-20 13:43:52",
  "tokenid": "0x0000000000000000000000000000000000000000",
  "type": null,
  "txid": "000000000000000000000000000000000000000000000000000",
  "amount": "000000000000000000000000000000000000000000000000000"
}

subscribeAddress

Creates a new subscription/IPN for the given address (and contractaddress). You will receive a notification to the given url every time a deposit is received. Unsubscribe the address before sending tokens/ETH from it or you won't get reliable notifications anymore.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully subscribed to IPN!.",
  • "data": {
    }
}

listSubscribedAddresses

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/webhooks',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! IPNs could be successfully parsed.",
  • "data": {}
}

unsubscribeAddress

Deletes an existing subscription/IPN for the given address (and contractaddress).

Authorizations:
apikeyAuth
path Parameters
webhookid
required
string
Example: 624d7db34b026365cc22356b

Webhook id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/tron/webhooks/624d7db34b026365cc22356b',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully unsubscribed to IPN!.",
  • "data": {
    }
}

listFailedIPNs

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/tron/webhooks/notifications/failed',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "failed_ipns": [
    ]
}

resendFailedIPN

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "id": 17766
}

Tron > Transaction Requests

sendTransaction

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "to": "TEZU8f2twTLYJ8XPfLrRAXNCNqVt5xtV1M",
  • "amount": "1",
  • "privatekey": "92a5a62fdf7290244b564450f4ab10a5ea796f234aa6aded322c826ad40efb9c"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Successfully sent transaction.",
  • "data": [
    ]
}

sendTRC10

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "to": "TEZU8f2twTLYJ8XPfLrRAXNCNqVt5xtV1M",
  • "privatekey": "92a5a62fdf7290244b564450f4ab10a5ea796f234aa6aded322c826ad40efb9c",
  • "tokenId": 1002000,
  • "amount": "0.000001"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Successfully sent transaction.",
  • "data": [
    ]
}

sendTRC20

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "from": "TPbJ4q2wZP2UpsE7ME3bxewS5pKAdWZwCj",
  • "to": "TEZU8f2twTLYJ8XPfLrRAXNCNqVt5xtV1M",
  • "privatekey": "privatekey",
  • "contractaddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
  • "amount": "0.1"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Successfully sent transaction.",
  • "data": [
    ]
}

sendTRC721

Authorizations:
apikeyAuth
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
""

Bitcoin

Bitcoin > Info Requests

getLastBlockNumber

Get the latest block number

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bitcoin/blocks/number',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed",
  • "data": {
    }
}

getBlock

Authorizations:
apikeyAuth
path Parameters
block
required
integer
Example: 737832

Block Number

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bitcoin/blocks/737832',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed the block.",
  • "data": [
    ]
}

getTransaction

You can get your transaction decoded by add /decoded to your api call. If you want to get the transaction encoded, youst remove the /decoded part

Authorizations:
apikeyAuth
path Parameters
id
required
string
Example: abf9fdf4144c999034075815455285c5a475d6e0203e4af7050844c8264f16e3

Transaction Id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bitcoin/transactions/abf9fdf4144c999034075815455285c5a475d6e0203e4af7050844c8264f16e3/decoded',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed transaction data.",
  • "data": {
    }
}

getBlockchaIninfo

Authorizations:
apikeyAuth

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://api.chaingateway.io/v2/bitcoin/info'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully parsed chain parameters.",
  • "data": {
    }
}

getFees

The fees are parted into three categroies

fast (10min / 1 block)
medium (30 min / 3 blocks)
slow (60 min / 6 blocks)

this tells you in wich block distance your transaction get confirmed. A block is around ~10 minutes.

Please note that fees are dynamic by transaction size. This is only an estimation!

Authorizations:
apikeyAuth

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://api.chaingateway.io/v2/bitcoin/fees'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Successfully get fees.",
  • "data": {
    }
}

Bitcoin > Wallet Requests

createWallet

Authorizations:
apikeyAuth
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "password": "test123"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Bitcoin Wallet was successfully created.",
  • "data": {
    }
}

getWallet

Authorizations:
apikeyAuth

Responses

Request samples

const request = require('request');

const options = {method: 'GET', url: 'https://api.chaingateway.io/v2/bitcoin/wallets'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! bitcoinWallets has been successfully parsed.",
  • "data": {
    }
}

deleteWallet

Authorizations:
apikeyAuth
path Parameters
walletname
required
string
Example: Evolo_4215179

Name of your wallet

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/bitcoin/wallets/Evolo_4215179'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Bitcoin Wallet has been successfully deleted.",
  • "data": {
    }
}

createWalletAddress

Authorizations:
apikeyAuth
path Parameters
wallet_name
required
string
Example: Evolo_2163532

Wallet name

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Bitcoin Wallet Address successfully created",
  • "data": {
    }
}

getWalletAddresses

Authorizations:
apikeyAuth
path Parameters
wallet_name
required
string
Example: Evolo_2163532

Wallet name

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bitcoin/wallets/Evolo_2163532/addresses'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Bitcoin Wallet Address successfully loaded",
  • "data": [
    ]
}

exportAddressPrivateKey

Authorizations:
apikeyAuth
path Parameters
name
required
string
Example: Evolo_4215179
address
required
string
Example: bc1qz3hdws5lt5ug7qwfv4m4ttanaq67ts77ekv95x
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "password": "test123"
}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Bitcoin Wallet Address private key successfully loaded",
  • "data": {
    }
}

Bitcoin > Transaction Requests

sendTransaction

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "to": "bc1qzq8m9ukvvgvj7kmlejnfr2q4ndmk2e4ndtr9rn",
  • "amount": "1",
  • "walletname": "Evolo_6928232",
  • "password": "Test123",
  • "subtractfee": false,
  • "speed": "fast"
}

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Bitcoin > Webhooks/IPN Requests

With webhooks, you can get notified about various events in the blockchain. E.g:

Receipt of payment to a specific address
Outgoing payment from a specific address
Exchange of sats between two specific addresses
Execution of a contract
Change of ownership of a token

For this you have to create a webhook with certain filter criteria. The following values are available as filter criteria:

from: Outgoing address
to: Incoming address
contract: Contract that should be monitored
tokenid: ID of a token that should be monitored.
type: Token type ([ETH', 'ERC20', 'ERC721', null)

Parameter "url" defines the url we are calling with a POST Request.. The request body will have your filter criterias and some additional informatiion about your transaction:

{
  "id": "63a1ae0887ca3625b82b4924",
  "webhook_id": "63a1ad0e87ca3625b82b4923",
  "from": "0x0000000000000000000000000000000000000000",
  "to": "0xa9d1e08c7793af67e9d92fe308d5697fb81d3e43",
  "blocknumber": "123",
  "datetime": "22-12-20 13:43:52",
  "tokenid": "0x0000000000000000000000000000000000000000",
  "type": null,
  "txid": "000000000000000000000000000000000000000000000000000",
  "amount": "000000000000000000000000000000000000000000000000000"
}

subscribeAddress

Creates a new subscription/IPN for the given address (and contractaddress). You will receive a notification to the given url every time a deposit is received. Unsubscribe the address before sending tokens/ETH from it or you won't get reliable notifications anymore.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully subscribed to IPN!.",
  • "data": {
    }
}

listSubscribedAddresses

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bitcoin/webhooks',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! IPNs could be successfully parsed.",
  • "data": {}
}

unsubscribeAddress

Deletes an existing subscription/IPN for the given address (and contractaddress).

Authorizations:
apikeyAuth
path Parameters
id
required
string
Example: 63ef470294d74b0f290b4b64

Webhook id

header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'DELETE',
  url: 'https://api.chaingateway.io/v2/bitcoin/webhooks/63ef470294d74b0f290b4b64',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Successfully unsubscribed to IPN!.",
  • "data": {
    }
}

listFailedIPNs

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/bitcoin/webhooks/notifications/failed',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "failed_ipns": [
    ]
}

resendFailedIPN

Returns all subscriptions/IPNs created with an account.

Authorizations:
apikeyAuth
path Parameters
notification_id
required
string
Example: 62640817eb594da78c7bee00

Notification id

header Parameters
Accept
string
Example: application/json
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "ok": true,
  • "id": 17766
}

Market

getRateByCurrency

Authorizations:
apikeyAuth
path Parameters
currency1
required
string
Example: btc
currency2
required
string
Example: eur
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/markets/prices/btc/eur',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Bitcoinprice has been successfully parsed.",
  • "data": {
    }
}

getCurrencies

Authorizations:
apikeyAuth
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/markets/currencies',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Currency list has been successfully parsed.",
  • "data": {
    }
}

getPriceDataByCurrency

Authorizations:
apikeyAuth
path Parameters
currency1
required
string
Example: btc
currency2
required
string
Example: usd
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/markets/data/btc/usd',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Currency data has been successfully parsed.",
  • "data": {
    }
}

getAllTimeHigh

Authorizations:
apikeyAuth
path Parameters
currency1
required
string
Example: btc
currenty2
required
string
Example: eur
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/markets/prices/btc/eur/ath',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Success! Currency data has been successfully parsed.",
  • "data": {
    }
}

getAllTimeLow

Authorizations:
apikeyAuth
path Parameters
currency1
required
string
Example: btc
currency2
required
string
Example: eur
header Parameters
Accept
string
Example: application/json

Responses

Request samples

const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.chaingateway.io/v2/markets/prices/btc/eur/atl',
  headers: {Accept: 'SOME_STRING_VALUE'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

Response samples

Content type
application/json
{
  • "ok": true,
  • "status": 200,
  • "message": "Currency data has been successfully parsed.",
  • "data": {
    }
}